<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <div>
            <label>ID:
                <input type="text" v-model="id"/>
            </label>
            <label>Name:
                <input type="text" v-model="name"/>
            </label>
            <input type="button" value="添加" @click="add" />
        </div>

        <!-- :key 必需是字符串/数字 -->
        <p v-for="item in list" :key="item.id">
            <input type="checkbox" name="names">
            {{item.id}}---{{item.name}}
        </p>
    </div>
    <script>
            var vm = new Vue({
                el:'#app',
                data:{
                    id: '',
                    name: '',
                    list: [
                        {id:1, name:'张三'},
                        {id:2, name:'李四'},
                        {id:3, name:'王五'},
                        {id:4, name:'赵六'},
                        {id:5, name:'洪七'}
                    ]
                },
                methods:{
                    add(){
                        this.list.push({id:this.id, name:this.name});
                    }
                }
            });
        </script>
</body>
</html>